<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>标题栏</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="css/index.css" />
    <script type="text/javascript" src="js/jquery-latest.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    
    <script type="text/javascript">


	    $(function () {
	    	//loadLocalJSON();

	    	initNavMenu($('#topframe', parent.document).attr("jsondata"));
	    	
	    	$('#top_menu > li > a').bind('click', function(){
	    		//取得元素的兄弟节点切换其class为d2并设置当前选择为d1
	    		$(this).parent(".d2").siblings().attr("class", "d2");
	    		$(this).parent(".d2").attr("class", "d1");
	    	});
	
	    	/*绑定语言切换*/
	        $("#language_span").click(function (event) {
	
	            $('#language_menu').menu({
	                minWidth: 10
	            });
	
	            $('#language_menu').menu('show', {
	                left: event.pageX - 5,
	                top: event.pageY + 85
	            });
	        });
	    });

		/*初始化导航栏menu*/
	    function initNavMenu(jsonurl){
	    	$.get(jsonurl, function(content){ 
	    		var json = $.parseJSON(content);
	    		//debugger;
	    		$("#top_menu").html("");
	    		$.each(json.navs, function(i, item){
	    			addMenu(i, item);
	    		});
	    	}); 
		}

		function addMenu(i, obj){
			
			var str = '';

			if(i == 0){
				str += '<li class="d1">';
			}else{
				str += '<li class="d2">';
			}

			if(obj.url.toString() == "js"){
				str += '<a href="javascript:void(0);" ';
			}else{
				str += '<a href="#"';
			}

			str += 'onclick="parent.loadLocalJSON(' + i + ');">';//maybe

			str += obj.name + '</a>';

			//alert(str);

			$("#top_menu").append(str);
		}
    
    </script>
</head>
<body>

    
    
    <div class="all">

        <div class="head">
            <div class="headl">
                <div class="logo">
                    <img src="images/chyine1.png" usemap="#Map" border="0" />
                    <map name="Map" id="Map">
                      <area shape="rect" coords="0,4,40,44" href="javascript:void(0);" target="_self" alt="" onclick="parent.showIndex();"/>
                    </map>
                </div>
                <div class="daohang">
                    <ul id="top_menu">

                        <!-- <li class="d1">
                            <a href="javascript:void(0);" onclick="parent.loadLocalJSON('0');">生产协调</a>
                        </li>

                        <li class="d2">
                            <a href="javascript:void(0);" onclick="parent.loadLocalJSON('1');">生产动态</a>
                        </li>

                        <li class="d2">
                            <a href="javascript:void(0);" onclick="parent.loadLocalJSON('2');">工程计算</a>
                        </li>

                        <li class="d2">
                            <a href="#">生产报表</a>
                        </li>

                        <li class="d2">
                            <a href="#">综合分析</a>
                        </li>

                        <li class="d2">
                            <a href="#">井史归档</a>
                        </li> -->
                    </ul>
                </div>
            </div>
            <div class="headr">
                <div class="r1"></div>
                <div class="r2">
                    <div class="r3">
                        <div class="r4">
                            <ul>
                                <li><img src="images/chyine8.png" /></li>
                                <li>辽河油田用户 &nbsp;&nbsp;&nbsp;切换语言：&nbsp;</li>
                                <li><img id="language_span" src="images/chyine7.png" style="cursor: pointer;" /></li>
                                <li>&nbsp;&nbsp;<a href="login.html" style="color: #fff">注销</a></li>
                            </ul>
                        </div>
                        <div class="clear"></div>
                        
                        <marquee scrollAmount=2 width=300 onmouseover=stop() onmouseout=start()>
                        	<a href="#" style="color: #fff">您有<font style="color:#F00"> 3 </font>条待办消息</a>
                        </marquee>
                        
                        <div>天气预报：北京 多云&nbsp; <img  src="images/c1.gif"/>&nbsp;13℃-24℃ &nbsp;当前时间：<span id="time"></span></div>
                         
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </div>

    </div>
	
    <!-- 首页右侧语言菜单 -->
    <div id="language_menu" class="easyui-menu" style="height: 65px;overflow: scroll;">
        <div id="ch_ZN">简体中文（√）</div>
        <div id="en_US">英语</div>
        <div id="ru">俄语</div>
        <div id="fr">法语</div>
        <div id="es">西班牙语</div>
    </div>
</body>
</html>